
try:
    file = open(".//demo.txt", "r")
    content = file.read()
    print(content)
except FileNotFoundError:
    print("File not found")
finally:
    file.close()  # 确保文件被关闭
    print("文件被关闭了")